#if UNITY_EDITOR

using System;
using UnityEditor;
using UnityEngine;


namespace HEFramework
{

    /// <summary>
    ///
    /// AB GUI风格
    /// 
    /// ----------------------------------------
    /// 作者 hep
    /// 创建时间：2023-12-21 20:32:02
    /// ----------------------------------------
    /// </summary>
    public class AssetBundleGUIStyle
    {
        public static GUIStyle Label { get; private set; }
        public static GUIStyle BoldLabel { get; private set; }
        public static GUIStyle SmallLabel { get; private set; }
        public static GUIStyle LargeLabel { get; private set; }
        public static GUIStyle TextField { get; private set; }
        public static GUIStyle TextFieldPath { get; private set; }
        public static GUIStyle TextFieldCell { get; private set; }
        public static GUIStyle TextArea { get; private set; }
        public static GUIStyle Toggle { get; private set; }
        public static GUIStyle Button { get; private set; }
        public static GUIStyle HelpBox { get; private set; }
        public static GUIStyle Foldout { get; private set; }


        public static void Ensure()
        {
            const int fontSizeSmall = 11;
            const int fontSizeNormal = 11;
            const int fontSizeInput = 11;
            const int fontSizeLarge = 14;


            Label = new GUIStyle(EditorStyles.label)
            {
                fontSize = fontSizeNormal,
                wordWrap = true,
                richText = true
            };
            BoldLabel = new GUIStyle(EditorStyles.label)
            {
                fontStyle = FontStyle.Bold,
                fontSize = fontSizeNormal
            };
            SmallLabel = new GUIStyle(EditorStyles.label)
            {
                fontSize = fontSizeSmall,
                wordWrap = true,
                richText = true
            };
            LargeLabel = new GUIStyle(EditorStyles.largeLabel)
            {
                fontStyle = FontStyle.Bold,
                fontSize = fontSizeLarge
            };


            TextField = new GUIStyle(EditorStyles.textField)
            {
                fontSize = fontSizeInput
            };
            TextFieldPath = new GUIStyle(EditorStyles.textField)
            {
                fontSize = fontSizeNormal
            };
            TextFieldCell = new GUIStyle(EditorStyles.textField)
            {
                fontSize = fontSizeNormal,
                margin = new RectOffset(1, 1, 1, 1)
            };
            TextArea = new GUIStyle(EditorStyles.textArea)
            {
                fontSize = fontSizeInput
            };


            HelpBox = new GUIStyle(EditorStyles.helpBox)
            {
                fontSize = fontSizeSmall
            };
            Toggle = new GUIStyle(EditorStyles.toggle)
            {
                fontSize = fontSizeNormal
            };
            Button = new GUIStyle(EditorStyles.miniButton)
            {
                fontStyle = FontStyle.Bold,
                fontSize = fontSizeInput
            };
            Foldout = new GUIStyle(EditorStyles.foldout)
            {
                fontStyle = FontStyle.Bold,
                fontSize = fontSizeInput,
                fixedWidth = 400,
                fixedHeight = 20
            };
        }
    }
}


#endif